package com.ngc.mall.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ngc.mall.common.configure.mybatisPlus.BaseServiceImpl;
import com.ngc.mall.domain.StoreDomain;
import com.ngc.mall.mapper.StoreMapper;
import com.ngc.mall.service.IStoreService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * 门店实现类
 * @author: chenxiaolin
 * @date 2023/9/20 18:13
**/
@Service
public class StoreServiceImpl extends BaseServiceImpl<StoreMapper, StoreDomain> implements IStoreService {

    @Override
    public List<StoreDomain> selectAll() {
        return super.list();
    }

    @Override
    public Long createStore(StoreDomain storeDomain) {
        return super.create(storeDomain);
    }

    @Override
    public Boolean updateStoreById(Long id, StoreDomain storeDomain) {
        return super.update(storeDomain, Wrappers.<StoreDomain>lambdaQuery().eq(StoreDomain::getId,id));
    }
}
